package com.jay.lang.management.intf;

import java.lang.management.BufferPoolMXBean;
import java.lang.management.ManagementFactory;
import java.util.List;

public class BufferPoolMXBeanIntf {
	public static void main(String[] args) {
		List<BufferPoolMXBean> pools = ManagementFactory
				.getPlatformMXBeans(BufferPoolMXBean.class);
		for (BufferPoolMXBean mxbean : pools) {
			System.out.println("--------------");
			System.out.println(mxbean.getCount());
			System.out.println(mxbean.getMemoryUsed());
			System.out.println(mxbean.getTotalCapacity());
			System.out.println(mxbean.getName());
			System.out.println(mxbean.toString());
			System.out.println(mxbean.getClass());
			System.out.println(mxbean.getObjectName());
		}
	}
}
